/**
 * Copyright (c) 2018-2028, HQY 胡庆一 (215218393@qq.com).
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ocm.pay.wrapper;

import cn.hutool.core.util.DesensitizedUtil;
import com.ocm.core.mp.support.BaseEntityWrapper;
import com.ocm.core.tool.utils.BeanUtil;
import com.ocm.pay.entity.ShopPayinfo;
import com.ocm.pay.vo.ShopPayinfoVO;

/**
 * 包装类,返回视图层所需的字段
 *
 * @author HQY
 * @since 2021-12-24
 */
public class ShopPayinfoWrapper extends BaseEntityWrapper<ShopPayinfo, ShopPayinfoVO>  {

    public static ShopPayinfoWrapper build() {
        return new ShopPayinfoWrapper();
    }

	@Override
	public ShopPayinfoVO entityVO(ShopPayinfo shopPayinfo) {
		ShopPayinfoVO shopPayinfoVO = BeanUtil.copy(shopPayinfo, ShopPayinfoVO.class);
		shopPayinfoVO.setCodeId(DesensitizedUtil.idCardNum(shopPayinfoVO.getCodeId(),4,2));
		shopPayinfoVO.setCodeName(DesensitizedUtil.chineseName(shopPayinfoVO.getCodeName()));
		return shopPayinfoVO;
	}

}
